package com.itheima.Thraed.ThreadPrinciple;

public class demo01 {

    public static int state = 1;

    public static void main(String[] args) {
        Thread t = new Thread(){
            @Override
            public void run() {
                method1(20);
            }
        };
        t.setName("t1");
        t.start();
        method1(10);
    }

    private static void method1(int x){
        int y = x + 1;
        Object m = method2();
        System.out.println(m);

    }

    private static Object method2(){
        Object n = new Object();
        return n;
    }
}
